1. Field of the Invention
The present invention relates to an automatic program synthesizer for automatically generating a program suitable for system specifications of a target system, e.g., a plant control system and, more particularly, to an automatic program synthesizer for generating an interpolation program for interpolating a plurality of partial programs.
2. Description of the Related Art
A conventional program synthesizer has been developed to generate a synthetic program as a set of partial programs by simultaneously managing variables and constants used in a plurality of partial programs and standardizing names of variables and constants having identical definitions.
FIGS. 6 and 7 are block diagrams showing schematic and detailed arrangements of a conventional program synthesizer system. The conventional program synthesizer system comprises a system specification input means 1 for inputting system specifications and an automatic program synthesizer A for automatically synthesizing a program suitable for the system specifications input from the system specification input means 1.
The automatic program synthesizer A comprises a program synthesis rule memory means 2, a program synthesis goal generating means 3, a program generating means 7, a variable name generating means 8, a variable attribute memory means 9, and a variable attribute managing means 10. The program synthesis rule memory means 2 stores program synthesis rules. The program synthesis goal generating means 3 refers to the program synthesis rules and generates a program synthesis goal 3a on the basis of the specifications input from the system specification input means 1. The program generating means 7 defines attributes of variables used in the program on the basis of the program synthesis goal 3a received from the program synthesis goal generating means 3. The program generating means 7 generates so-called definition/retrieval conditions 4 of variable attributes which represent condition for retrieving variables having the same attributes, generates a variable name 5 actually used in the program on the basis of the definition conditions or retrieval conditions, and generates a partial program 6. The variable attribute managing means 10 causes the variable name generating means 8 to generate a new variable name and stores in the variable attribute memory means 9 the variable name generated by the variable name generating means 8 and the attribute designated by the definition/retrieval conditions 4 of variable attributes when the condition received from the program generating means 7 is the definition condition. When the condition received from the program generating means 7 represents the retrieval condition, the variable attribute managing means 10 retrieves a name of a variable having the attribute designated by the definition/retrieval conditions 4 of variable attributes from the variable attribute memory means 9 and sends back the retrieved name to the program generating means 7.
An undefined variable detecting means 11, an input means 13, and a program editing means 15 are arranged as means for manually synthesizing a plurality of partial programs 6. The undefined variable detecting means 11 detects an undefined variable 11a in the partial program 6 generated by the program generating means 7. A designer 12 uses the input means 13 to input an interpolation program for generating an undefined variable on the basis of the undefined variable 11a. By using the program editing means 15, a synthetic program 14 obtained by synthesizing the plurality of partial programs is generated by using the interpolation program input from the input means 13.
In order to generate the synthetic program 14 by synthesizing several partial programs 6 in the conventional program synthesizer, the names of variables of the partial programs 6 in which variables (including constants) used in the individual partial programs 6 have identical attributes must be standardized to synthesize the partial programs.
In the above synthesizer system, when the definitions of the variables do not perfectly match with each other, a plurality of partial programs 6 cannot be synthesized. For this reason, the undefined variable detecting means 11 is arranged to detect the undefined variable 11a from the nonsynthesized portion of the programs 6. The designer 12 corrects the partial programs 6 while referring to the undefined variables 11a or adds an interpolation program to obtain a finally synthesized program 14.
It takes a long period of time for the designer 12 to generate the interpolation program. It also takes a long period of time to obtain a perfectly synthetic program 14 suitable for the system specifications. Therefore, program synthesis efficiency is low in the conventional system.